<?php

class Damages_Methods_Data_User_Detailed extends Damages_Methods_Data_User {

  /**
   *
   * @var Damages_Methods_Data_DealerData_Detailed[] 
   */
  public $dealers = array();

  public function __construct(DamagesUsers $user) {
    parent::__construct($user, true);
    foreach ($user->getUserDealerss() as $userDealer) {
      $this->dealers[] = new Damages_Methods_Data_DealerData_Detailed($userDealer->getDealers());
    }
    $this->permission = new Damages_Methods_Data_Permission($user->getPermissions(), false, true);
  }

}